/*
 * This file is part of Space Invaders: Rehash
 * Copyright (C)2007 Vicent Marti (tanoku@gmail.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __CUTSCENE_H__
#define __CUTSCENE_H__

#include "SDL.h"
#include <stdio.h>
#include <string>
#include <vector>

#include "timer.h"
#include "main.h"

#define CHARACTER_DELAY 50
#define NEWLINE_DELAY 2500

class CutScene : public SI_Screen
{
	std::vector<std::string> m_textLines;
	int m_totalChars;
	int m_drawnLines;
	bool m_pauseType;
	bool m_skipping;
	
	int m_skm_x;
	int m_skm_y;
	
	char *m_skm;
	
	SimpleTimer *m_typet;
	bool m_finished;

	int m_levelid;
	int m_seenrules;
	
public:
	CutScene(int level_id, int seen_rules);
	
	void render();
	bool isRendering() { return m_typet->isStarted(); }
	bool finished() { return m_finished; }
	void tick();
	void onEvent( SDL_Event *event );
	int getNextScreen()
	{
		return SCREEN_GAME_NEWLEVEL;
	}

	void drawGameRule( int count, int gamerule, bool isNew );
	void drawAllRules();
};



#endif
